<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="common.util.Constants" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>File upload test</title>
</head>
<body>
	<form action="uploadFile.do"  enctype="multipart/form-data" method="POST">
		<input type="file" id="file" name="attachment" />
		<input type="file" id="file" name="attachment" />
		<input type="submit" value="upload"/>
	</form>
	<%
	  String[] fileLinks = (String[])request.getAttribute("fileLinks");
	  String[] fileNames = (String[])request.getAttribute("fileNames");
	  if(fileLinks != null && fileLinks.length > 0)
	  {
		  int i = 0;
		  for(String link : fileLinks)
		  {
		  %>
		    <a href="../../<%= Constants.StorageDirName + "/" + link%>"><%=fileNames[i] %></a><br/>
		  <%
		  	  i++;
		  }
	  }
	%>
</body>
</html>